const _getStorage = (key)=>{
  if(wx.getStorageSync( key ))
  {
    return JSON.parse(wx.getStorageSync( key ))
  }else{
    return null
  }
  
}

const _setStorage = (key,value)=>{
  return wx.setStorageSync( key,JSON.stringify(value) );
}

const _clearStorage = ()=>{
  wx.clearStorageSync();
}

const _removeStorage = ( key )=>{
  wx.removeStorageSync( key );
}


module.exports = {
  _getStorage,
  _setStorage,
  _clearStorage,
  _removeStorage,
}